import request from "@/utils/request";

//查询菜单列表
export const menuMgrListService = (params) => {
  return request.get("/admin/sys-menu/findMenuTree");
};

// 新增菜单
export const menuMgrAddService = (data) => {
  return request.post("/admin/sys-menu/save", data);
};

// 修改菜单
export const menuMgrUpdateService = (data) => {
  return request.put("/admin/sys-menu/update", data);
};

// 删除菜单
export const menuMgrDeleteService = (id) => {
  return request.delete(`/admin/sys-menu/remove/${id}`);
};

// 查询用户可以操作的菜单接口
export const menuMgrUserMenuService = (userId) => {
  return request.get(`/admin/sys-menu/menus/${userId}`);
};
